from rest_framework.filters import BaseFilterBackend
from django_filters import rest_framework as filters
from .models import Crawler, MonitoringGoods


class CrawlerByKeyboardFilter(filters.FilterSet):
	keyboard = filters.CharFilter(lookup_expr='icontains')

	class Meta:
		model = Crawler
		fields = ['keyboard',]


class MonitoringByKeyboardFilter(filters.FilterSet):
	keyboard = filters.CharFilter(lookup_expr='icontains')

	class Meta:
		model = MonitoringGoods
		fields = ['keyboard',]